package reflect;

/**
 * 反射帮助类，列出反射的方法中一些非自定义的方法
 * list methods of non user-defined
 * @author liuding,2012-3-30
 *
 * $LastChangedDate$
 * $Author$ 
 */
public class ReflectHelper
{
    public static String[] NonDefineMethods = {"getClass", "wait", "notifyAll", "notify", "hashCode",  "toString", "equals"};
    
    /**
     * 判断一个方法是不是用户自定义的方法,若是，返回true
     * 若在NonDefineMethods内，返回false
     * Is a user-defined method?
     * @param methodName
     * @return
     * @author liuding,2012-3-30
     */
    public static boolean isDefineMethod(String methodName){
        for(String m : NonDefineMethods){
            if(m.equals(methodName)) {
                return false;
            }
        }
        return true;
    }
}
